import React, { Component } from 'react'

export default class Detail extends Component {
    goBack = () => {
        this.props.history.goBack()
    }
    render() {
        return (
            <div>
                <div>
                    <button onClick={ this.goBack }>返回</button>
                </div>
                {/* 详情页 --- { this.props.location.state.id } */}
                {/* 详情页 --- { this.props.location.aaaaa.id } */}
                详情页 --- { this.props.match.params.id }
            </div>
        )
    }
    componentDidMount() {
        console.log(this.props)
    }
}
